//do-while循环语句求100至999之间的水仙花数
#include <iostream>
using namespace std;
int main()
{
    int num=100;
    int count=0;
    do{
        int x=num%10;
        int y=num/100;
        int z=num/10%10;
        if(x*x*x+y*y*y+z*z*z==num){
            cout<<num<<endl;
            count++;
        }
        num++;
    }while(num<1000);
    cout<<"一共有"<<count<<"个水仙花数"<<endl;
    return 0;
}